import turtle as tu
import datetime
def main():
    tu.setup(800,350,200,200)
    tu.penup()
    tu.forward(-300)
    tu.pensize(5)
    tu.pencolor("red")
    drawDate(datetime.datetime.now().strftime('%Y'))
    tu.pencolor("green")
    drawDate(datetime.datetime.now().strftime('%m'))
    tu.pencolor("blue")
    drawDate(datetime.datetime.now().strftime('%d'))
    tu.hideturtle()
def drawLine(draw):
    tu.pendown() if draw else tu.penup()
    tu.forward(40)
    tu.right(90)
def drawDight(d):
    drawLine(True) if d in[2,3,4,5,6,8,9] else drawLine(False)
    drawLine(True) if d in [0,1,3,4,5,6,7,8,9] else drawLine(False)
    drawLine(True) if d in [0,2,3,5,6,8,9] else drawLine(False)
    drawLine(True) if d in [0,2,6,8] else drawLine(False)
    tu.left(90)
    drawLine(True) if d in [0,4,5,6,8,9] else drawLine(False)
    drawLine(True) if d in [0,2,3,5,6,7,8,9] else drawLine(False)
    drawLine(True) if d in [0,1,2,3,4,7,8,9] else drawLine(False)
    tu.left(180)
    tu.penup()
    tu.forward(20)
def drawDate(date):
    for i in date:
        drawDight(eval(i))
main()
